Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Adding a new table to the Repository
If your application requires data that cannot easily be represented in the Repository database tables, you can add an additional table or tables to store it. Whether you actually add these tables to the Repository database itself (ICFDB) or to your application database is up to you. In either case, you can join the new tables to other Repository tables to provide a connection between standard Repository data and your extensions.
In this case, you need a new table to store the field edit definitions for the manager to use. This is an extension to the Repository definition of entities (tables) and their fields. When you import entity definitions into the Repository as the first step in defining a Progress Dynamics application for your database, the framework creates an
EntityMnemonicrecord for each table, and an entity display field record for each field in the table, with some of its display characteristics, such as its label and format. The Object Generator uses this data to create the default SDOs, browsers, and viewers that make up the starter set of objects in the application.Figure 7–2 shows these two standard Repository tables.
Figure 7–2: Standard Repository tables
![]()
To support the Field Edit Manager, you must add an additional table to store field edit information for each field. The table is called
gsc_entity_field_edit. You can create it in the OpenEdge Data Dictionary. The table contains the fields described in Table 7–1.
You must have a unique primary index on the
entity_field_edit_objfield, and a second index on this field plus theedit_typefield.When creating the new table, provide the appropriate format for the object ID fields, with nine decimals to assure that the site ID for the database is properly encoded, as shown in Figure 7–3.
Figure 7–3: Field Properties window
![]()
Use a
CREATEtrigger procedure to define code that assigns the next available object ID to each new record. The procedure must include the standard framework code that defines thegetNextObjfunction and invoke it to assign the ID. The Table Triggers window is shown in Figure 7–4.Figure 7–4: Table Triggers dialog box
![]()
How does the field edit data gets into the new table? Presumably, you create a tool where developers define special edits, but that is beyond the scope of this discussion. You can populate the table using a procedure to define some test values, such as the following example, which marks the
CustNum,Name,City,State, andCountryfields in the Sports2000 databaseCustomertable as required fields, and theStatefield as requiring uppercase. For example:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |